import Vue from "vue";
import VueRouter from "vue-router";

Vue.use(VueRouter);

const routes = [
  {
    path: "/",
    redirect: "/home",
  },
  {
    path: "/home",
    component: () => import("../components/home.vue"),
    children: [
      {
        path: "/zhexian1",
        component: () => import("../components/zhexian1.vue"),
      },
      {
        path: "/zhexian2",
        component: () => import("../components/zhexian2.vue"),
      },
      {
        path: "/zhu1",
        component: () => import("../components/zhu1.vue"),
      },
      {
        path: "/zhu2",
        component: () => import("../components/zhu2.vue"),
      },
      {
        path: "/bing1",
        component: () => import("../components/bing1.vue"),
      },
      {
        path: "/bing2",
        component: () => import("../components/bing2.vue"),
      },
    ],
  },
];

const router = new VueRouter({
  mode: "history",
  base: process.env.BASE_URL,
  routes,
});

export default router;
